class EventMailer < ActionMailer::Base
  def cfw(events, recipient, message, host_with_port)
    recipients recipient.email
    from RETURN_ADDRESS
    subject :cfw.l
    host, port = host_with_port.split(':')
    body :recipient => recipient.salutation, :events => events, :host => host, :port => port || 80, :message => message
  end
  
  def notification(user, subject_text, body_text)
    recipients user.email
    subject :subject.localize_with_args(:text => subject_text)
    from RETURN_ADDRESS
    body :content => body_text
  end
end
